const KoaRouter = require('koa-router')

// 中间件/控制器
const {
  auth
} = require('../middleware/auth.middleware')
const {
  validator
} = require('../middleware/order.middleware')

const { create} = require('../controller/order.controller')


const router = new KoaRouter({
  prefix: '/orders'
})

router.post('/',auth,validator({
  address_id:"integer",
  goods_info:"string",
  total:"integer"
}),create)

module.exports = router